package com.example.pei.ithinklearnt.view.customview;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;

import com.example.pei.ithinklearnt.R;

/**
 * Created by Pei on 2017/12/3.
 */


public class headChooseDialog extends Dialog implements View.OnClickListener {

    private Context context;
    private Button dialog_photocamera;
    private Button dialog_photogallery;
    private Button dialog_photocancel;
    private LeaveMyDialogListener listener;

    public interface LeaveMyDialogListener {
        public void onClick(View view);
    }

    public headChooseDialog(@NonNull Context context) {
        super(context);
        this.context=context;

    }

    public headChooseDialog(Context context, int theme, LeaveMyDialogListener listener) {
        super(context, theme);
        this.context=context;
        this.listener=listener;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(R.layout.photo_choose_dialog);
        dialog_photocamera=(Button)findViewById(R.id.btn_t);
        dialog_photocancel=(Button)findViewById(R.id.btn_c);
        dialog_photogallery=(Button)findViewById(R.id.btn_g);
        dialog_photogallery.setOnClickListener(this);
        dialog_photocancel.setOnClickListener(this);
        dialog_photocamera.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        listener.onClick(v);
    }


}
